﻿<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Content/css/quiz.css" />
<form name="QuizForm" action="" method="POST">

<fieldset> 
    <legend>@ViewData["testTitle"]</legend>



<input type="hidden" name="ID" value="@ViewData["id"]" />
@foreach (var v in ViewData["list"] as List<GameSchool.Models.ViewModels.QuizViewModel>)
{

   
  <fieldset>
    <h2>@v.QuestionTitle</h2>

<ul>
@foreach (var choice in v.choices)
{
    
 
    <section class="one-half">  

    @if (v.completed == true)
    {
         <li>
             <INPUT TYPE=RADIO name=@v.QuestionID VALUE=@choice.ID DISABLED> @choice.Title 
        </li>
    }
    else
    {        
    <li>
        <INPUT TYPE=RADIO name=@v.QuestionID VALUE=@choice.ID> @choice.Title 
    </li>
        
    }
    </section>
    <section class="one-half last">
    @if (v.completed == true)
    {
        if (choice.Correct == true)
        {    
     <div class="correctAnswer"><img src="@Url.Content("~/Content/img/design/finished.png")"class="answerCheck" /></div>
        }
        else
        {
            <div class="correctAnswer"><img src="@Url.Content("~/Content/img/design/unfinished.png")"class="answerCheck" /></div>
        }
        }  
   
    </section>
 
}

</ul>
</fieldset>
}

<input type="submit" value="Svara" />


 </fieldset>   



